/*=+--+=#=+--     Unmanned Aerial System Management Software      --+=#=+--+=#*\
|          Copyright (C) 2011 Regents of the University of Colorado.           |
|                             All Rights Reserved.                             |

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as
     published by the Free Software Foundation.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

            Jack Elston                       Cory Dixon                        
|           elstonj@colorado.edu              dixonc@colorado.edu              |
|                                                                              |
\*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*/

#ifndef _GEOCODER_H
#define _GEOCODER_H

#include "String.h"
#include "socket.h"
#include "threadedPipe.h"

  /*<-------Defines--------->*/
#define GEO_CONNECTION_TIMEOUT 10 
  /*<-------Defines--------->*/

#include <xercesc/util/PlatformUtils.hpp>

class Geocoder
{
	public:
		Geocoder();
		~Geocoder();

		void search(const char * city, const char * state);
		void search(const char * misc);
		void send_query(String query);
		void parse(int n);
		void move_map();

	protected:
		Socket *sock;

		char data[FIFO_BUF_SIZE];

		void init_socket();
};
#endif
